package com.hsc.www;


import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Controller
@SpringBootApplication
@EnableEurekaClient
public class ProviderUpms8020 {


    @RequestMapping("/upms/getAll")
    @ResponseBody
    List<Map> getAll() {
        List<Map> mapList = new ArrayList<>();
        for (int i = 0; i < 5; i++) {
            Map map = new HashMap();
            map.put("id", i + 1);
            map.put("userName", "userName" + (i + 1));
            map.put("from", "8020");
            mapList.add(map);
        }
        return mapList;
    }

    public static void main(String[] args) {
        SpringApplication.run(ProviderUpms8020.class, args);
    }

}